package org.eiahe.hr.attendance.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.eiahe.hr.attendance.domain.SpecialAttendanceRule;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 特殊员工考勤规则视图对象 hr_special_attendance_rule
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SpecialAttendanceRule.class)
public class SpecialAttendanceRuleVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 规则ID
     */
    @ExcelProperty(value = "规则ID")
    private Long ruleId;

    /**
     * 员工ID
     */
    @ExcelProperty(value = "员工编号")
    private String employeeNo;

    private Long userId;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    private String employeeName;

    /**
     * 规则类型(1-免打卡 2-弹性工作制 3-远程办公 4-其他)
     */
    @ExcelProperty(value = "规则类型")
    private String ruleType;

    /**
     * 规则说明
     */
    @ExcelProperty(value = "规则说明")
    private String ruleContent;

    /**
     * 申请原因
     */
    //@ExcelProperty(value = "申请原因")
    //private String applyReason;

    /**
     * 生效日期
     */
    @ExcelProperty(value = "生效日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate effectiveDate;

    /**
     * 失效日期
     */
    @ExcelProperty(value = "失效日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expiryDate;

    /**
     * 申请状态(0-待审批 1-已通过 2-已驳回 3-已撤销)
     */
    @ExcelProperty(value = "申请状态")
    private String applyStatus;

    /**
     * 审批人ID
     */
    @ExcelProperty(value = "审批人ID")
    private Long approverId;

    /**
     * 审批人姓名
     */
    @ExcelProperty(value = "审批人姓名")
    private String approverName;

    /**
     * 审批时间
     */
    @ExcelProperty(value = "审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate approvalTime;

    /**
     * 审批意见
     */
    @ExcelProperty(value = "审批意见")
    private String approvalComment;

    /**
     * 是否已提醒到期(0-否 1-是)
     */
    @ExcelProperty(value = "是否已提醒到期")
    private String isReminded;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 证明材料附件
     */
    private String attachment;

    private String attachmentName;

    private String attachmentUrl;
}
